# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-nokogiri
_pkgname=nokogiri
pkgver=1.18.9
pkgrel=1
pkgdesc='An HTML, XML, SAX, and Reader parser.'
arch=('any')
license=('MIT')
depends=('ruby-mini_portile2')
makedepends=('ruby-rdoc')
options=('!distcc')
url='http://nokogiri.org'
source=("https://rubygems.org/gems/$_pkgname-$pkgver.gem")
sha512sums=('3d51fb952f5b63026c0753ccc81c6d553b0680b658f883e8fb13b53daf1374168997226ccbb696cef2d5d600a978ee9364959692d4d9586f77c8aee242c07241')
noextract=("$_pkgname-$pkgver.gem")

package() {
  _gemdir=$(ruby -e 'puts Gem.default_dir')

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -i "$pkgdir$_gemdir" "$_pkgname-$pkgver.gem"
  else
    gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
      "$_pkgname-$pkgver.gem"
  fi
}

